package com.telecom.didi;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {

	private TextView mTextView;
	private boolean isEnd = false;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		mTextView = (TextView) findViewById(R.id.tv_test);
		mTextView.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				if (!isEnd) {
					mTextView.setBackgroundColor(getResources().getColor(
							R.color.blue));
					isEnd = true;
				} else {
					mTextView.setBackgroundColor(getResources().getColor(
							R.color.jj));
					isEnd = false;
				}

			}

		});
	}
}
